/*
 * Ext GWT - Ext for GWT
 * Copyright(c) 2007-2009, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */
/*package com.hy.mydesktop.client.mvc;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import org.apache.jasper.tagplugins.jstl.If;
import org.eclipse.jdt.internal.compiler.ast.ThisReference;


import com.extjs.gxt.ui.client.Registry;
import com.extjs.gxt.ui.client.Style.LayoutRegion;
import com.extjs.gxt.ui.client.core.FastMap;
import com.extjs.gxt.ui.client.data.BaseModel;
import com.extjs.gxt.ui.client.data.BaseModelData;
import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.event.Events;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.WindowEvent;
import com.extjs.gxt.ui.client.mvc.AppEvent;
import com.extjs.gxt.ui.client.mvc.Controller;
import com.extjs.gxt.ui.client.mvc.Dispatcher;
import com.extjs.gxt.ui.client.mvc.View;
import com.extjs.gxt.ui.client.util.Margins;
import com.extjs.gxt.ui.client.widget.Component;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.HtmlContainer;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.Viewport;
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.AccordionLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayout;
import com.extjs.gxt.ui.client.widget.layout.BorderLayoutData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.RootPanel;
import com.test.client.Gxt_desktop;
import com.test.client.component.event.AppEvents;
import com.test.client.component.meta.GxtComponentMetaModel;
import com.test.client.component.meta.GxtComponentMetaNodeModel;
import com.test.client.component.mvc.factory.GxtComponentControlerFactory;
import com.test.client.component.type.ComponentControllerEnum;
import com.test.client.component.type.ComponentTypeEnum;
import com.test.client.rpc.ServiceInvoker;
import com.test.client.rpc.ServiceInvokerAsync;
import com.test.client.widget.LoginDialog;
import com.test.shared.rpc.meta.GxtToSeamServiceParameter;
import com.test.shared.rpc.meta.GxtToSeamServiceResult;

public class LoginView extends View {

   // final ServiceInvokerAsync serviceInvoker = GWT.create(ServiceInvoker.class);
	 ServiceInvokerAsync serviceInvoker = Registry.get(Gxt_desktop.DESKTOP);
	
    LoginDialog dialog = null;
  
  public LoginView(Controller controller) {
    super(controller);
  }

  
  protected void initialize() {
	*//**
	 *  LoginDialog dialog = new LoginDialog();   
	 *  通过Rpc，提交dialog获得的用户名密码
	 *  获得返回值
	 *  如果是ture，
	 *  如果是false，重定向到LoginDialog
	 *//*
	  dialog= new LoginDialog();   
	  dialog.setClosable(false);  
    
	final GxtToSeamServiceParameter gxtToSeamServiceParameter = new GxtToSeamServiceParameter();
	gxtToSeamServiceParameter.setServiceComponentName("com.test.server.business.PersonService");
	gxtToSeamServiceParameter.setServiceMethodName("loadGxtComponentMetaModel");
	BaseModel[] methodArguments2 = new BaseModel[1];
	methodArguments2[0] = new BaseModel();
	gxtToSeamServiceParameter.setMethodArguments(methodArguments2 );   
    dialog.show();
  }
  
  *//**
   * 模拟从后台传入的元模型信息（关于快捷方式的）
   *//*
  private GxtComponentMetaModel getDesktopMetaModel() {
		Map<String, Object> map1=new HashMap<String, Object>();
		map1.put("component_model_type", ComponentTypeEnum.DESKTOP_MODEL);
		GxtComponentMetaNodeModel node1=new GxtComponentMetaNodeModel(map1, 1, 10);
		
		Map<String, Object> map2=new HashMap<String, Object>();
		map2.put("component_model_type", ComponentTypeEnum.SHORTCUT_MODEL);
		//TODO map2.put("appEventType", AppEvents.DESKTOP_SHORTCUT_ONCLICK_INIT);
		map2.put("appEventType", AppEvents.DESKTOP_SHORTCUT_ONCLICK_INIT);
			Map<String,Object> codes2 = new HashMap<String, Object>();
			//添加需要监听的事件类型，及附加参数和数据
			*//**
			 * 00_01_02为特征码
			 * 
			 *//*
			codes2.put("0003", "00_01_02");
			//codes1.add("0002");
		map2.put("registereventtypes", codes2);
		map2.put("text", "createWindow-----111LoginView----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");	
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(map2, 2, 3);
		
		Map<String, Object> map3=new HashMap<String, Object>();
		map3.put("component_model_type", ComponentTypeEnum.SHORTCUT_MODEL);
		map3.put("text", "222LoginView----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");			
			Map<String,Object> codes3 = new HashMap<String, Object>();
			codes3.put("0003", "00_01_02");
			//codes1.add("0002");
			map3.put("registereventtypes", codes3);
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(map3, 4, 5);
		
		Map<String, Object> map4=new HashMap<String, Object>();
		map4.put("component_model_type", ComponentTypeEnum.DESKTOP_MENUITEM_MODEL);
		map4.put("text", "001LoginView----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");			
			Map<String,Object> codes4 = new HashMap<String, Object>();
			codes4.put("0003", "00_01_02");
			//codes1.add("0002");
			map4.put("registereventtypes", codes4);
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(map4, 6, 7);
		
		Map<String, Object> map5=new HashMap<String, Object>();
		map5.put("component_model_type", ComponentTypeEnum.DESKTOP_MENUITEM_MODEL);
		map5.put("text", "002LoginView----AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER");			
			Map<String,Object> codes5 = new HashMap<String, Object>();
			codes5.put("0003", "00_01_02");
			//codes1.add("0002");
			map5.put("registereventtypes", codes5);
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(map5, 8, 9);
		
		List<GxtComponentMetaNodeModel> list = new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node1);
		list.add(node2);
		list.add(node3);
		list.add(node4);
		list.add(node5);
		GxtComponentMetaModel gxtComponentMetaModel = new GxtComponentMetaModel();
		gxtComponentMetaModel.setList(list);
		
		return gxtComponentMetaModel;
		
	}
	
  protected void handleEvent(AppEvent event) {
	  dialog.addListener(Events.Hide, new Listener<WindowEvent>() {
	      public void handleEvent(WindowEvent be) {
	        //Dispatcher.forwardEvent(AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER);  	  
	    	  *//**
	    	   * getServices()
	    	   * 调用后台业务逻辑，返回一些参数对象
	    	   * 如：List<GxtComponentMetaNodeModel> list
	    	   *//*	  
	    	  //if(登录成功)   Dispatcher.forwardEvent(AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER,object);
	    	
	    	  if (true) {
	    		  *//**
	    		   * 如果登录成功，调用后台业务逻辑，
	    		   * 返回
	    		   *//*
	    	//	 Dispatcher.get().addController(desktopcontroller);
	    		  *//**
	    		   * 包装windowController 和 dataLoadController
	    		   *//*
	    	//	 Dispatcher.get().addController(windowController);	    		    		  
	    		 // Dispatcher.forwardEvent(AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER);
			}
	    	  
	      }

		
	    });
	  if (event.getType() == AppEvents.DESKTOP_UER_LOGIN_VALIDATE) {
		  final GxtComponentMetaModel gxtComponentMetaModel = this.getDesktopMetaModel();
		    final Controller desktopcontroller = this.createDynamicDesktopController();
		    final Controller windowController = this.createDynamicWindowController2();
		    final Controller dataLoadController = this.createDataLoadController();
		  *//**
			 *  LoginDialog dialog = new LoginDialog();   
			 *  通过Rpc，提交dialog获得的用户名密码
			 *  获得返回值
			 *  如果是ture，
			 *  如果是false，重定向到LoginDialog
			 *//*
		 
		    TextField<String> username = ((TextField<String>)(dialog.getItemByItemId("userName")));
		    final TextField<String> password = ((TextField<String>)(dialog.getItemByItemId("password")));
		    GxtToSeamServiceParameter gxtToSeamServiceParameter = new GxtToSeamServiceParameter();
			gxtToSeamServiceParameter.setServiceComponentName("com.test.server.business.DepartmentServices");
			gxtToSeamServiceParameter.setServiceMethodName("validateLogin0");
			BaseModel[] methodArguments2 = new BaseModel[1];
			methodArguments2[0] = new BaseModel();
			methodArguments2[0].set("username", username.getValue());
			methodArguments2[0].set("password", password.getValue());
			gxtToSeamServiceParameter.setMethodArguments(methodArguments2 );
			
			System.err.println("***********************");
			System.out.println(serviceInvoker);
			if (serviceInvoker==null) {
				serviceInvoker = GWT.create(ServiceInvoker.class);
			}
			final MessageBox box = MessageBox.wait("用 户 登 录 ",   
		            "Loading your setting and data, please wait......", "Logining...");  
			serviceInvoker.callService(gxtToSeamServiceParameter,
					new AsyncCallback<GxtToSeamServiceResult>() {

						@Override
						public void onSuccess(GxtToSeamServiceResult result) {
							
							List<GxtComponentMetaModel> bmBaseModels = new LinkedList<GxtComponentMetaModel>();						
							ModelData modelData = result.getResult();
							bmBaseModels = modelData.get("listOfModelData");
							//Registry.register(Gxt_desktop.GXTCOMPONENTMETAMODELS,bmBaseModels);
							//map = modelData.get("listOfModelData");
							//System.err.println("&&&&&&&&&&&&&&" + bmBaseModels);
							//Dispatcher.get().addController(desktopcontroller);
							for (GxtComponentMetaModel gxtComponentMetaModel : bmBaseModels) {
								//TODO Dispatcher.get().addController(GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel)
								
								if (password.getValue().equals("xxxxx")) {
									box.close();
									MessageBox.alert("Access Denied", "您的用户名或密码错误，请重新登录", null);
									//dialog = new LoginDialog();
									dialog.getState().clear();
									dialog.show();
									//Dispatcher.forwardEvent(AppEvents.DESKTOP_UER_LOGIN_FAILURE,new HashMap<String, Object>());

								}else {
									Controller controller = GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
									Dispatcher.get().addController(controller
									);
									box.close();
									Dispatcher.forwardEvent(AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER,new HashMap<String, Object>());
								}
							}
							
									
							
						 Dispatcher.get().addController(desktopcontroller);		    		  
				    	 Dispatcher.get().addController(windowController);				    		  				    		  
				    		  Dispatcher.forwardEvent(AppEvents.DESKTOP_INIT_FOR_LOGGED_IN_USER);
						
						}

						@Override
						public void onFailure(Throwable caught) {
							box.close();
							MessageBox.alert("Access Denied", "系统登录失败，请稍后重试 !", null);
							System.out.println("#### Rpc Exception is ####"+caught +" When get the List<GxtComponentMetaNodeModel>");
							caught.printStackTrace();
						}
					});
	}
  }
  
  *//**
   * Desktop的桌面的元模型信息
   *//*
  private Controller createDynamicDesktopController() {
		Map<String , Object> desktopController=new HashMap<String, Object>();
		desktopController.put("component_controller_model_type", ComponentControllerEnum.DESKTOP_CONTROLLOR_MODEL);
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0003");
		codes1.add("0002");
		codes1.add("0005");
		desktopController.put("registereventtypes", codes1);
		desktopController.put("id", "desktopController");
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(desktopController,1,14);
		
		Map<String , Object> shortcutController=new HashMap<String, Object>();
		shortcutController.put("component_controller_model_type", ComponentControllerEnum.SHORTCUT_CONTROLLER_MODEL);
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0003");
		codes2.add("0002");
		codes2.add("0005");
		shortcutController.put("registereventtypes", codes2);
		shortcutController.put("id", "shortcutController01");
		shortcutController.put("viewdata", "shortcut_viewData_init_01");		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(shortcutController,2,3);
		
		Map<String , Object> shortcutController2=new HashMap<String, Object>();
		shortcutController2.put("component_controller_model_type", ComponentControllerEnum.SHORTCUT_CONTROLLER_MODEL);
		List<String> codes22 = new ArrayList<String>();
		codes22.add("0003");
		codes22.add("0002");
		codes22.add("0005");
		shortcutController2.put("registereventtypes", codes22);
		shortcutController2.put("id", "shortcutController03");
		shortcutController2.put("viewdata", "shortcut_viewData_init_03");		
		GxtComponentMetaNodeModel node22=new GxtComponentMetaNodeModel(shortcutController2,4,5);
		
		Map<String , Object> desktopMeunItemController=new HashMap<String, Object>();
		desktopMeunItemController.put("component_controller_model_type", ComponentControllerEnum.DESKTOP_MENUITEM_CONTROLLER_MODEL);
		List<String> codes3 = new ArrayList<String>();
		codes3.add("0003");
		codes3.add("0002");
		codes3.add("0005");
		desktopMeunItemController.put("registereventtypes", codes3);
		desktopMeunItemController.put("id", "desktopMeunItemController01");
		desktopMeunItemController.put("viewdata", "desktopmenuitem_viewData_init_01");		
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(desktopMeunItemController,6,7);
		
		
		Map<String , Object> desktopMeunItemController2=new HashMap<String, Object>();
		desktopMeunItemController2.put("component_controller_model_type", ComponentControllerEnum.DESKTOP_MENUITEM_CONTROLLER_MODEL);
		List<String> codes32 = new ArrayList<String>();
		codes32.add("0003");
		codes32.add("0002");
		codes32.add("0005");
		desktopMeunItemController2.put("registereventtypes", codes32);
		desktopMeunItemController2.put("id", "desktopMeunItemController02");
		desktopMeunItemController2.put("viewdata", "desktopmenuitem_viewData_init_02");		
		GxtComponentMetaNodeModel node32=new GxtComponentMetaNodeModel(desktopMeunItemController2,8,9);
		
		Map<String , Object> desktopStartMenuController=new HashMap<String, Object>();
		desktopStartMenuController.put("component_controller_model_type", ComponentControllerEnum.DESKTOP_STARTMENU_CONTROLLER_MODEL);
		List<String> codes4 = new ArrayList<String>();
		codes4.add("0003");
		codes4.add("0002");
		codes4.add("0005");
		desktopStartMenuController.put("registereventtypes", codes4);
		desktopStartMenuController.put("id", "desktopStartMenuController01");
		desktopStartMenuController.put("viewdata", "desktopStartMenu_viewData_init_01");		
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(desktopStartMenuController,10,11);
		
		Map<String , Object> desktopStartMenuController2=new HashMap<String, Object>();
		desktopStartMenuController2.put("component_controller_model_type", ComponentControllerEnum.DESKTOP_STARTMENU_CONTROLLER_MODEL);
		List<String> codes42 = new ArrayList<String>();
		codes42.add("0003");
		codes42.add("0002");
		codes42.add("0005");
		desktopStartMenuController2.put("registereventtypes", codes42);
		desktopStartMenuController2.put("id", "desktopStartMenuController02");
		desktopStartMenuController2.put("viewdata", "desktopStartMenu_viewData_init_02");		
		GxtComponentMetaNodeModel node42=new GxtComponentMetaNodeModel(desktopStartMenuController2,12,13);

		
		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		list.add(node22);
		list.add(node3);		
		list.add(node32);		
		list.add(node4);		
		list.add(node42);		
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
		
	}
	
  *//**
	 * 动态创建树形控制器----窗口相关
	 *//*
	private Controller createDynamicController() {
		Map<String , Object> windowController=new HashMap<String, Object>();
		windowController.put("component_controller_model_type", ComponentControllerEnum.WINDOW_CONTROLLER_MODEL);
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0101");
		codes1.add("0301");		
		codes1.add("0003");
		codes1.add("0201");
		//codes1.add("0005");
		codes1.add("0007");
		codes1.add("0008");
		
		windowController.put("id", "windowController");
		windowController.put("registereventtypes", codes1);
		windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(windowController,1,12);
		
		Map<String , Object> contentPanelController=new HashMap<String, Object>();
		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0201");
		codes2.add("0301");
		codes2.add("0101");
		codes2.add("0007");
		codes2.add("0008");
		contentPanelController.put("registereventtypes", codes2);				
		contentPanelController.put("id", "contentPanelController");				
		contentPanelController.put("viewdata", "contentPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(contentPanelController,2,11);
		
		Map<String , Object> menuBarController=new HashMap<String, Object>();
		menuBarController.put("component_controller_model_type", ComponentControllerEnum.MENUBAR_CONTROLLER_MODEL);
		List<String> codes3 = new ArrayList<String>();
		codes3.add("0201");
		codes3.add("0301");
		codes3.add("0101");
		codes3.add("0007");
		codes3.add("0008");
		menuBarController.put("registereventtypes", codes3);
		menuBarController.put("id", "menuBarController");
		menuBarController.put("viewdata", "menuBar_viewData_init_01");		
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(menuBarController,3,4);
		
		Map<String , Object> toolBarController=new HashMap<String, Object>();
		toolBarController.put("component_controller_model_type", ComponentControllerEnum.TOOLBAR_CONTROLLER_MODEL);
		List<String> codes4 = new ArrayList<String>();
		codes4.add("0201");
		codes4.add("0301");
		codes4.add("0101");
		codes4.add("0007");
		codes4.add("0008");
		toolBarController.put("registereventtypes", codes4);
		toolBarController.put("id", "toolBarController");
		toolBarController.put("viewdata", "toolBar_viewData_init_01");		
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(toolBarController,5,6);
		
		Map<String , Object> formPanelController=new HashMap<String, Object>();
		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		List<String> codes5 = new ArrayList<String>();
		codes5.add("0201");
		codes5.add("0301");
		codes5.add("0101");
		codes5.add("0007");
		codes5.add("0008");
		formPanelController.put("registereventtypes", codes5);
		formPanelController.put("id", "formPanelController");
		formPanelController.put("controllerdata", "formPanel_controllerdata_init_01");		
		formPanelController.put("viewdata", "formPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(formPanelController,7,10);
		
		Map<String , Object> textFieldController=new HashMap<String, Object>();
//		textFieldController.put("component_controller_model_type", ComponentControllerEnum.GRID_MODEL);
		textFieldController.put("component_controller_model_type", ComponentControllerEnum.GRID_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		textFieldController.put("registereventtypes", codes6);
		textFieldController.put("id", "textFieldController");
		textFieldController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(textFieldController,8,9);
		
		Map<String , Object> textFieldController=new HashMap<String, Object>();
		textFieldController.put("component_controller_model_type", ComponentControllerEnum.TEXTFIELD_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		textFieldController.put("registereventtypes", codes6);
		textFieldController.put("id", "textFieldController");
		textFieldController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(textFieldController,8,9);
		
		Map<String , Object> comboBoxController=new HashMap<String, Object>();
		comboBoxController.put("component_controller_model_type", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		comboBoxController.put("registereventtypes", codes6);
		comboBoxController.put("id", "textFieldController");
		comboBoxController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(comboBoxController,8,9);
		
		Map<String , Object> dateFieldController=new HashMap<String, Object>();
		dateFieldController.put("component_controller_model_type", ComponentControllerEnum.DATEFIELD_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		dateFieldController.put("registereventtypes", codes6);
		dateFieldController.put("id", "textFieldController");
		dateFieldController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(dateFieldController,8,9);

		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		list.add(node3);
		list.add(node4);
		list.add(node5);
		list.add(node6);
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
		
	}
	
	 *//**
	 * 动态创建树形控制器----窗口相关
	 *//*
	private Controller createDynamicWindowController() {
		
		//窗口+树
		Map<String , Object> windowController=new HashMap<String, Object>();
		windowController.put("component_controller_model_type", ComponentControllerEnum.WINDOW_CONTROLLER_MODEL);
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0101");
		codes1.add("0301");		
		codes1.add("0003");
		codes1.add("0201");
		codes1.add("0401");
		codes1.add("0007");
		codes1.add("0008");
		
		windowController.put("id", "windowController");
		windowController.put("registereventtypes", codes1);
		windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(windowController,1,14);
		
		Map<String , Object> contentPanelController=new HashMap<String, Object>();
		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0201");
		codes2.add("0301");
		codes2.add("0401");
		codes2.add("0101");
		codes2.add("0007");
		codes2.add("0008");
		contentPanelController.put("registereventtypes", codes2);				
		contentPanelController.put("id", "contentPanelController");				
		contentPanelController.put("viewdata", "contentPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(contentPanelController,2,13);
		
		Map<String , Object> menuBarController=new HashMap<String, Object>();
		menuBarController.put("component_controller_model_type", ComponentControllerEnum.MENUBAR_CONTROLLER_MODEL);
		List<String> codes3 = new ArrayList<String>();
		codes3.add("0201");
		codes3.add("0301");
		codes3.add("0401");
		codes3.add("0101");
		codes3.add("0007");
		codes3.add("0008");
		menuBarController.put("registereventtypes", codes3);
		menuBarController.put("id", "menuBarController");
		menuBarController.put("viewdata", "menuBar_viewData_init_01");		
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(menuBarController,3,4);
		
		Map<String , Object> toolBarController=new HashMap<String, Object>();
		toolBarController.put("component_controller_model_type", ComponentControllerEnum.TOOLBAR_CONTROLLER_MODEL);
		List<String> codes4 = new ArrayList<String>();
		codes4.add("0201");
		codes4.add("0301");
		codes4.add("0401");
		codes4.add("0101");
		codes4.add("0007");
		codes4.add("0008");
		toolBarController.put("registereventtypes", codes4);
		toolBarController.put("id", "toolBarController");
		toolBarController.put("viewdata", "toolBar_viewData_init_01");		
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(toolBarController,5,6);
		
		
		
		
		Map<String, Object> sumFormPanelController=new HashMap<String, Object>();
		sumFormPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMPANEL_CONTROLLER_MODEL);
		List<String> codes45 = new ArrayList<String>();
		codes45.add("0201");
		codes45.add("0301");
		codes45.add("0401");
		codes45.add("0101");
		codes45.add("0007");
		codes45.add("0008");
		sumFormPanelController.put("registereventtypes", codes45);
		sumFormPanelController.put("id", "sumFormPanelController");
		sumFormPanelController.put("controllerdata", "sumFormPanel_controllerdata_init_01");		
		sumFormPanelController.put("viewdata", "sumFormPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node45=new GxtComponentMetaNodeModel(sumFormPanelController, 7, 12);
		
		
		Map<String , Object> formPanelController=new HashMap<String, Object>();
		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		List<String> codes5 = new ArrayList<String>();
		codes5.add("0201");
		codes5.add("0301");
		codes5.add("0401");
		codes5.add("0101");
		codes5.add("0007");
		codes5.add("0008");
		formPanelController.put("registereventtypes", codes5);
		formPanelController.put("id", "formPanelController");
		formPanelController.put("controllerdata", "formPanel_controllerdata_init_01");		
		formPanelController.put("viewdata", "formPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(formPanelController,8,9);
		
		Map<String , Object> treePanelModulesController=new HashMap<String, Object>();
		treePanelModulesController.put("component_controller_model_type", ComponentControllerEnum.TREEPANELMODULES_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0401"); 
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		treePanelModulesController.put("registereventtypes", codes6);
		treePanelModulesController.put("id", "treePanelModulesController");
		treePanelModulesController.put("viewdata", "treePanelModules_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(treePanelModulesController,10,11);
		
		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		list.add(node3);
		list.add(node4);
		list.add(node45);
		list.add(node5);
		list.add(node6);
		
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
		
		
		
		//窗口+表格
		Map<String , Object> windowController=new HashMap<String, Object>();
		windowController.put("component_controller_model_type", ComponentControllerEnum.WINDOW_CONTROLLER_MODEL);
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0101");
		codes1.add("0301");		
		codes1.add("0003");
		codes1.add("0201");
		codes1.add("0401");
		codes1.add("0007");
		codes1.add("0008");
		
		windowController.put("id", "windowController");
		windowController.put("registereventtypes", codes1);
		windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(windowController,1,16);
		
		Map<String , Object> contentPanelController=new HashMap<String, Object>();
		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0201");
		codes2.add("0301");
		codes2.add("0401");
		codes2.add("0101");
		codes2.add("0007");
		codes2.add("0008");
		contentPanelController.put("registereventtypes", codes2);				
		contentPanelController.put("id", "contentPanelController");				
		contentPanelController.put("viewdata", "contentPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(contentPanelController,2,15);
		
		Map<String , Object> menuBarController=new HashMap<String, Object>();
		menuBarController.put("component_controller_model_type", ComponentControllerEnum.MENUBAR_CONTROLLER_MODEL);
		List<String> codes3 = new ArrayList<String>();
		codes3.add("0201");
		codes3.add("0301");
		codes3.add("0401");
		codes3.add("0101");
		codes3.add("0007");
		codes3.add("0008");
		menuBarController.put("registereventtypes", codes3);
		menuBarController.put("id", "menuBarController");
		menuBarController.put("viewdata", "menuBar_viewData_init_01");		
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(menuBarController,3,4);
		
		Map<String , Object> toolBarController=new HashMap<String, Object>();
		toolBarController.put("component_controller_model_type", ComponentControllerEnum.TOOLBAR_CONTROLLER_MODEL);
		List<String> codes4 = new ArrayList<String>();
		codes4.add("0201");
		codes4.add("0301");
		codes4.add("0401");
		codes4.add("0101");
		codes4.add("0007");
		codes4.add("0008");
		toolBarController.put("registereventtypes", codes4);
		toolBarController.put("id", "toolBarController");
		toolBarController.put("viewdata", "toolBar_viewData_init_01");		
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(toolBarController,5,6);
		
		
		
		
		Map<String, Object> sumFormPanelController=new HashMap<String, Object>();
		sumFormPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMPANEL_CONTROLLER_MODEL);
		List<String> codes45 = new ArrayList<String>();
		codes45.add("0201");
		codes45.add("0301");
		codes45.add("0401");
		codes45.add("0101");
		codes45.add("0007");
		codes45.add("0008");
		sumFormPanelController.put("registereventtypes", codes45);
		sumFormPanelController.put("id", "sumFormPanelController");
		sumFormPanelController.put("controllerdata", "sumFormPanel_controllerdata_init_01");		
		sumFormPanelController.put("viewdata", "sumFormPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node45=new GxtComponentMetaNodeModel(sumFormPanelController, 7, 14);
		
		
		Map<String , Object> formPanelController=new HashMap<String, Object>();
		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		List<String> codes5 = new ArrayList<String>();
		codes5.add("0201");
		codes5.add("0301");
		codes5.add("0401");
		codes5.add("0101");
		codes5.add("0007");
		codes5.add("0008");
		formPanelController.put("registereventtypes", codes5);
		formPanelController.put("id", "formPanelController");
		formPanelController.put("controllerdata", "formPanel_controllerdata_init_01");		
		formPanelController.put("viewdata", "formPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(formPanelController,8,9);
		
		Map<String , Object> textFieldController=new HashMap<String, Object>();
		textFieldController.put("component_controller_model_type", ComponentControllerEnum.GRIDSETMODULES_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0401"); 
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		textFieldController.put("registereventtypes", codes6);
		textFieldController.put("id", "textFieldController");
		textFieldController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(textFieldController,10,13);
		
		Map<String , Object> dataLoadController=new HashMap<String, Object>();
		dataLoadController.put("component_controller_model_type", ComponentControllerEnum.GRID_DATALOAD_CONTROLLER_MODEL);
		List<String> codes12222 = new ArrayList<String>();
		codes12222.add("0101");
		codes12222.add("0301");		
		codes12222.add("0003");
		codes12222.add("0201");
		codes12222.add("0401");
		
		
		dataLoadController.put("id", "dataLoadController01");
		dataLoadController.put("registereventtypes", codes12222);
		//windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node62=new GxtComponentMetaNodeModel(dataLoadController,11,12);
		
//		Map<String , Object> textFieldController=new HashMap<String, Object>();
//		textFieldController.put("component_controller_model_type", ComponentControllerEnum.TEXTFIELD_CONTROLLER_MODEL);
//		List<String> codes6 = new ArrayList<String>();
//		codes6.add("0301"); 
//		codes6.add("0201"); 
//		codes6.add("0101");
//		codes6.add("0007");
//		codes6.add("0008");
//		textFieldController.put("registereventtypes", codes6);
//		textFieldController.put("id", "textFieldController");
//		textFieldController.put("viewdata", "textField_viewData_init_01");		
//		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(textFieldController,8,9);
//		
//		Map<String , Object> comboBoxController=new HashMap<String, Object>();
//		comboBoxController.put("component_controller_model_type", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL);
//		List<String> codes6 = new ArrayList<String>();
//		codes6.add("0301"); 
//		codes6.add("0201"); 
//		codes6.add("0101");
//		codes6.add("0007");
//		codes6.add("0008");
//		comboBoxController.put("registereventtypes", codes6);
//		comboBoxController.put("id", "textFieldController");
//		comboBoxController.put("viewdata", "textField_viewData_init_01");		
//		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(comboBoxController,8,9);
//		
//		Map<String , Object> dateFieldController=new HashMap<String, Object>();
//		dateFieldController.put("component_controller_model_type", ComponentControllerEnum.DATEFIELD_CONTROLLER_MODEL);
//		List<String> codes6 = new ArrayList<String>();
//		codes6.add("0301"); 
//		codes6.add("0201"); 
//		codes6.add("0101");
//		codes6.add("0007");
//		codes6.add("0008");
//		dateFieldController.put("registereventtypes", codes6);
//		dateFieldController.put("id", "textFieldController");
//		dateFieldController.put("viewdata", "textField_viewData_init_01");		
//		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(dateFieldController,8,9);

		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		list.add(node3);
		list.add(node4);
		list.add(node45);
		list.add(node5);
		list.add(node6);
		list.add(node62);
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
		
	}
	
private Controller createDynamicWindowController2() {
		
		//窗口+树
		Map<String , Object> windowController=new HashMap<String, Object>();
		windowController.put("component_controller_model_type", ComponentControllerEnum.WINDOW_CONTROLLER_MODEL);
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0101");
		codes1.add("0301");		
		codes1.add("0003");
		codes1.add("0201");
		codes1.add("0401");
		codes1.add("0007");
		codes1.add("0008");
		
		windowController.put("id", "windowController");
		windowController.put("registereventtypes", codes1);
		windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(windowController,1,14);
		
		Map<String , Object> contentPanelController=new HashMap<String, Object>();
		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0201");
		codes2.add("0301");
		codes2.add("0401");
		codes2.add("0101");
		codes2.add("0007");
		codes2.add("0008");
		contentPanelController.put("registereventtypes", codes2);				
		contentPanelController.put("id", "contentPanelController");				
		contentPanelController.put("viewdata", "contentPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(contentPanelController,2,13);
		
		Map<String , Object> menuBarController=new HashMap<String, Object>();
		menuBarController.put("component_controller_model_type", ComponentControllerEnum.MENUBAR_CONTROLLER_MODEL);
		List<String> codes3 = new ArrayList<String>();
		codes3.add("0201");
		codes3.add("0301");
		codes3.add("0401");
		codes3.add("0101");
		codes3.add("0007");
		codes3.add("0008");
		menuBarController.put("registereventtypes", codes3);
		menuBarController.put("id", "menuBarController");
		menuBarController.put("viewdata", "menuBar_viewData_init_01");		
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(menuBarController,3,4);
		
		Map<String , Object> toolBarController=new HashMap<String, Object>();
		toolBarController.put("component_controller_model_type", ComponentControllerEnum.TOOLBAR_CONTROLLER_MODEL);
		List<String> codes4 = new ArrayList<String>();
		codes4.add("0201");
		codes4.add("0301");
		codes4.add("0401");
		codes4.add("0101");
		codes4.add("0007");
		codes4.add("0008");
		toolBarController.put("registereventtypes", codes4);
		toolBarController.put("id", "toolBarController");
		toolBarController.put("viewdata", "toolBar_viewData_init_01");		
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(toolBarController,5,6);
		
		
		
		
		Map<String, Object> sumFormPanelController=new HashMap<String, Object>();
		sumFormPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMPANEL_CONTROLLER_MODEL);
		List<String> codes45 = new ArrayList<String>();
		codes45.add("0201");
		codes45.add("0301");
		codes45.add("0401");
		codes45.add("0101");
		codes45.add("0007");
		codes45.add("0008");
		sumFormPanelController.put("registereventtypes", codes45);
		sumFormPanelController.put("id", "sumFormPanelController");
		sumFormPanelController.put("controllerdata", "sumFormPanel_controllerdata_init_01");		
		sumFormPanelController.put("viewdata", "sumFormPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node45=new GxtComponentMetaNodeModel(sumFormPanelController, 7, 12);
		
		
		Map<String , Object> formPanelController=new HashMap<String, Object>();
		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		List<String> codes5 = new ArrayList<String>();
		codes5.add("0201");
		codes5.add("0301");
		codes5.add("0401");
		codes5.add("0101");
		codes5.add("0007");
		codes5.add("0008");
		formPanelController.put("registereventtypes", codes5);
		formPanelController.put("id", "formPanelController");
		formPanelController.put("controllerdata", "formPanel_controllerdata_init_01");		
		formPanelController.put("viewdata", "formPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(formPanelController,8,9);
		
		Map<String , Object> treePanelModulesController=new HashMap<String, Object>();
		treePanelModulesController.put("component_controller_model_type", ComponentControllerEnum.TREEPANELMODULES_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0401"); 
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		treePanelModulesController.put("registereventtypes", codes6);
		treePanelModulesController.put("id", "treePanelModulesController");
		treePanelModulesController.put("viewdata", "treePanelModules_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(treePanelModulesController,10,11);
		
		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		list.add(node3);
		list.add(node4);
		list.add(node45);
		list.add(node5);
		list.add(node6);
		
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
		
		
		
		//窗口+表格
		Map<String , Object> windowController=new HashMap<String, Object>();
		windowController.put("component_controller_model_type", ComponentControllerEnum.WINDOW_CONTROLLER_MODEL);
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0101");
		codes1.add("0301");		
		codes1.add("0003");
		codes1.add("0201");
		codes1.add("0401");
		codes1.add("0007");
		codes1.add("0008");
		
		windowController.put("id", "windowController");
		windowController.put("registereventtypes", codes1);
		windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(windowController,1,16);
		
		Map<String , Object> contentPanelController=new HashMap<String, Object>();
		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0201");
		codes2.add("0301");
		codes2.add("0401");
		codes2.add("0101");
		codes2.add("0007");
		codes2.add("0008");
		contentPanelController.put("registereventtypes", codes2);				
		contentPanelController.put("id", "contentPanelController");				
		contentPanelController.put("viewdata", "contentPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(contentPanelController,2,15);
		
		Map<String , Object> menuBarController=new HashMap<String, Object>();
		menuBarController.put("component_controller_model_type", ComponentControllerEnum.MENUBAR_CONTROLLER_MODEL);
		List<String> codes3 = new ArrayList<String>();
		codes3.add("0201");
		codes3.add("0301");
		codes3.add("0401");
		codes3.add("0101");
		codes3.add("0007");
		codes3.add("0008");
		menuBarController.put("registereventtypes", codes3);
		menuBarController.put("id", "menuBarController");
		menuBarController.put("viewdata", "menuBar_viewData_init_01");		
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(menuBarController,3,4);
		
		Map<String , Object> toolBarController=new HashMap<String, Object>();
		toolBarController.put("component_controller_model_type", ComponentControllerEnum.TOOLBAR_CONTROLLER_MODEL);
		List<String> codes4 = new ArrayList<String>();
		codes4.add("0201");
		codes4.add("0301");
		codes4.add("0401");
		codes4.add("0101");
		codes4.add("0007");
		codes4.add("0008");
		toolBarController.put("registereventtypes", codes4);
		toolBarController.put("id", "toolBarController");
		toolBarController.put("viewdata", "toolBar_viewData_init_01");		
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(toolBarController,5,6);
		
		
		
		
		Map<String, Object> sumFormPanelController=new HashMap<String, Object>();
		sumFormPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMPANEL_CONTROLLER_MODEL);
		List<String> codes45 = new ArrayList<String>();
		codes45.add("0201");
		codes45.add("0301");
		codes45.add("0401");
		codes45.add("0101");
		codes45.add("0007");
		codes45.add("0008");
		sumFormPanelController.put("registereventtypes", codes45);
		sumFormPanelController.put("id", "sumFormPanelController");
		sumFormPanelController.put("controllerdata", "sumFormPanel_controllerdata_init_01");		
		sumFormPanelController.put("viewdata", "sumFormPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node45=new GxtComponentMetaNodeModel(sumFormPanelController, 7, 14);
		
		
		Map<String , Object> formPanelController=new HashMap<String, Object>();
		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		List<String> codes5 = new ArrayList<String>();
		codes5.add("0201");
		codes5.add("0301");
		codes5.add("0401");
		codes5.add("0101");
		codes5.add("0007");
		codes5.add("0008");
		formPanelController.put("registereventtypes", codes5);
		formPanelController.put("id", "formPanelController");
		formPanelController.put("controllerdata", "formPanel_controllerdata_init_01");		
		formPanelController.put("viewdata", "formPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(formPanelController,8,9);
		
		Map<String , Object> textFieldController=new HashMap<String, Object>();
		textFieldController.put("component_controller_model_type", ComponentControllerEnum.GRIDSETMODULES_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0401"); 
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		textFieldController.put("registereventtypes", codes6);
		textFieldController.put("id", "textFieldController");
		textFieldController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(textFieldController,10,13);
		
		Map<String , Object> dataLoadController=new HashMap<String, Object>();
		dataLoadController.put("component_controller_model_type", ComponentControllerEnum.GRID_DATALOAD_CONTROLLER_MODEL);
		List<String> codes12222 = new ArrayList<String>();
		codes12222.add("0101");
		codes12222.add("0301");		
		codes12222.add("0003");
		codes12222.add("0201");
		codes12222.add("0401");
		
		
		dataLoadController.put("id", "dataLoadController01");
		dataLoadController.put("registereventtypes", codes12222);
		//windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node62=new GxtComponentMetaNodeModel(dataLoadController,11,12);
		
//		Map<String , Object> textFieldController=new HashMap<String, Object>();
//		textFieldController.put("component_controller_model_type", ComponentControllerEnum.TEXTFIELD_CONTROLLER_MODEL);
//		List<String> codes6 = new ArrayList<String>();
//		codes6.add("0301"); 
//		codes6.add("0201"); 
//		codes6.add("0101");
//		codes6.add("0007");
//		codes6.add("0008");
//		textFieldController.put("registereventtypes", codes6);
//		textFieldController.put("id", "textFieldController");
//		textFieldController.put("viewdata", "textField_viewData_init_01");		
//		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(textFieldController,8,9);
//		
//		Map<String , Object> comboBoxController=new HashMap<String, Object>();
//		comboBoxController.put("component_controller_model_type", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL);
//		List<String> codes6 = new ArrayList<String>();
//		codes6.add("0301"); 
//		codes6.add("0201"); 
//		codes6.add("0101");
//		codes6.add("0007");
//		codes6.add("0008");
//		comboBoxController.put("registereventtypes", codes6);
//		comboBoxController.put("id", "textFieldController");
//		comboBoxController.put("viewdata", "textField_viewData_init_01");		
//		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(comboBoxController,8,9);
//		
//		Map<String , Object> dateFieldController=new HashMap<String, Object>();
//		dateFieldController.put("component_controller_model_type", ComponentControllerEnum.DATEFIELD_CONTROLLER_MODEL);
//		List<String> codes6 = new ArrayList<String>();
//		codes6.add("0301"); 
//		codes6.add("0201"); 
//		codes6.add("0101");
//		codes6.add("0007");
//		codes6.add("0008");
//		dateFieldController.put("registereventtypes", codes6);
//		dateFieldController.put("id", "textFieldController");
//		dateFieldController.put("viewdata", "textField_viewData_init_01");		
//		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(dateFieldController,8,9);

		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		list.add(node3);
		list.add(node4);
		list.add(node45);
		list.add(node5);
		list.add(node6);
		list.add(node62);
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
		
	}
	
	 *//**
	 * 动态创建树形控制器----dataLoadController相关
	 *//*
	private Controller createDataLoadController() {
		Map<String , Object> dataLoadController=new HashMap<String, Object>();
		dataLoadController.put("component_controller_model_type", ComponentControllerEnum.GRID_DATALOAD_CONTROLLER_MODEL);
		List<String> codes12222 = new ArrayList<String>();
		codes12222.add("0101");
		codes12222.add("0301");		
		codes12222.add("0003");
		codes12222.add("0201");
		codes12222.add("0401");
		
		
		dataLoadController.put("id", "dataLoadController");
		dataLoadController.put("registereventtypes", codes12222);
		//windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(dataLoadController);
		
		

		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
	
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
		
	}
	
	
	 *//**
	 * 动态创建树形控制器----窗口相关
	 *//*
	private Controller createDynamicController3() {
		Map<String , Object> windowController=new HashMap<String, Object>();
		windowController.put("component_controller_model_type", ComponentControllerEnum.WINDOW_CONTROLLER_MODEL);
		List<String> codes1 = new ArrayList<String>();
		codes1.add("0101");
		codes1.add("0301");		
		codes1.add("0003");
		codes1.add("0201");
		//codes1.add("0005");
		codes1.add("0007");
		codes1.add("0008");
		
		windowController.put("id", "windowController");
		windowController.put("registereventtypes", codes1);
		windowController.put("viewdata", "window_viewData_init_01");		
		GxtComponentMetaNodeModel node=new GxtComponentMetaNodeModel(windowController,1,14);
		
		Map<String , Object> contentPanelController=new HashMap<String, Object>();
		contentPanelController.put("component_controller_model_type", ComponentControllerEnum.CONTENTPANEL_CONTROLLER_MODEL);
		List<String> codes2 = new ArrayList<String>();
		codes2.add("0201");
		codes2.add("0301");
		codes2.add("0101");
		codes2.add("0007");
		codes2.add("0008");
		contentPanelController.put("registereventtypes", codes2);				
		contentPanelController.put("id", "contentPanelController");				
		contentPanelController.put("viewdata", "contentPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node2=new GxtComponentMetaNodeModel(contentPanelController,2,13);
		
		Map<String , Object> menuBarController=new HashMap<String, Object>();
		menuBarController.put("component_controller_model_type", ComponentControllerEnum.MENUBAR_CONTROLLER_MODEL);
		List<String> codes3 = new ArrayList<String>();
		codes3.add("0201");
		codes3.add("0301");
		codes3.add("0101");
		codes3.add("0007");
		codes3.add("0008");
		menuBarController.put("registereventtypes", codes3);
		menuBarController.put("id", "menuBarController");
		menuBarController.put("viewdata", "menuBar_viewData_init_01");		
		GxtComponentMetaNodeModel node3=new GxtComponentMetaNodeModel(menuBarController,3,4);
		
		Map<String , Object> toolBarController=new HashMap<String, Object>();
		toolBarController.put("component_controller_model_type", ComponentControllerEnum.TOOLBAR_CONTROLLER_MODEL);
		List<String> codes4 = new ArrayList<String>();
		codes4.add("0201");
		codes4.add("0301");
		codes4.add("0101");
		codes4.add("0007");
		codes4.add("0008");
		toolBarController.put("registereventtypes", codes4);
		toolBarController.put("id", "toolBarController");
		toolBarController.put("viewdata", "toolBar_viewData_init_01");		
		GxtComponentMetaNodeModel node4=new GxtComponentMetaNodeModel(toolBarController,5,6);
		
		//创建提交和取消按钮
		Map<String, Object> btnSubmit=new HashMap<String, Object>();
		btnSubmit.put("component_model_type", ComponentTypeEnum.BUTTON_MODEL);
		btnSubmit.put("text", "确定");
		GxtComponentMetaNodeModel btnSubmit1=new GxtComponentMetaNodeModel(btnSubmit);
		
		Map<String, Object> btnquxiao=new HashMap<String, Object>();
		btnquxiao.put("component_model_type", ComponentTypeEnum.BUTTON_MODEL);
		btnquxiao.put("text", "取消");
		GxtComponentMetaNodeModel btn1=new GxtComponentMetaNodeModel(btnquxiao);
		
		List<GxtComponentMetaNodeModel> list1=new ArrayList<GxtComponentMetaNodeModel>();
		list1.add(btnSubmit1);
		list1.add(btn1);
		Map<String, Object> sumFormPanelController=new HashMap<String, Object>();
		List<String> codes45 = new ArrayList<String>();
		codes45.add("0201");
		codes45.add("0301");
		codes45.add("0101");
		codes45.add("0007");
		codes45.add("0008");
		sumFormPanelController.put("registereventtypes", codes45);
		sumFormPanelController.put("id", "sumFormPanelController");
		sumFormPanelController.put("controllerdata", "sumFormPanel_controllerdata_init_01");		
		sumFormPanelController.put("viewdata", "sumFormPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node45=new GxtComponentMetaNodeModel(sumFormPanelController, 7, 12);
		
		
		Map<String , Object> formPanelController=new HashMap<String, Object>();
		formPanelController.put("component_controller_model_type", ComponentControllerEnum.FORMSET_MODULE_CONTROLLER_MODEL);
		List<String> codes5 = new ArrayList<String>();
		codes5.add("0201");
		codes5.add("0301");
		codes5.add("0101");
		codes5.add("0007");
		codes5.add("0008");
		formPanelController.put("registereventtypes", codes5);
		formPanelController.put("id", "formPanelController");
		formPanelController.put("controllerdata", "formPanel_controllerdata_init_01");		
		formPanelController.put("viewdata", "formPanel_viewData_init_01");		
		GxtComponentMetaNodeModel node5=new GxtComponentMetaNodeModel(formPanelController,8,9);
		
		Map<String , Object> textFieldController=new HashMap<String, Object>();
	//??
			textFieldController.put("component_controller_model_type", ComponentControllerEnum.GRID_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		textFieldController.put("registereventtypes", codes6);
		textFieldController.put("id", "textFieldController");
		textFieldController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(textFieldController,10,11);
		
		Map<String , Object> textFieldController=new HashMap<String, Object>();
		textFieldController.put("component_controller_model_type", ComponentControllerEnum.TEXTFIELD_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		textFieldController.put("registereventtypes", codes6);
		textFieldController.put("id", "textFieldController");
		textFieldController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(textFieldController,8,9);
		
		Map<String , Object> comboBoxController=new HashMap<String, Object>();
		comboBoxController.put("component_controller_model_type", ComponentControllerEnum.COMBOBOX_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		comboBoxController.put("registereventtypes", codes6);
		comboBoxController.put("id", "textFieldController");
		comboBoxController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(comboBoxController,8,9);
		
		Map<String , Object> dateFieldController=new HashMap<String, Object>();
		dateFieldController.put("component_controller_model_type", ComponentControllerEnum.DATEFIELD_CONTROLLER_MODEL);
		List<String> codes6 = new ArrayList<String>();
		codes6.add("0301"); 
		codes6.add("0201"); 
		codes6.add("0101");
		codes6.add("0007");
		codes6.add("0008");
		dateFieldController.put("registereventtypes", codes6);
		dateFieldController.put("id", "textFieldController");
		dateFieldController.put("viewdata", "textField_viewData_init_01");		
		GxtComponentMetaNodeModel node6=new GxtComponentMetaNodeModel(dateFieldController,8,9);

		List<GxtComponentMetaNodeModel> list=new ArrayList<GxtComponentMetaNodeModel>();
		list.add(node);
		list.add(node2);
		list.add(node3);
		list.add(node4);
		list.add(node5);
		list.add(node6);
		GxtComponentMetaModel gxtComponentMetaModel=new GxtComponentMetaModel(list);
		return GxtComponentControlerFactory.createGxtComponentController(gxtComponentMetaModel);
		
	}
	
}*/
